Low speed speech encoding method based on internet protocol

ABSTRACT

The invention is a low speed speech encoding method based on Internet protocol (IP), comprising: determining speech characteristic parameters in TN duration, determining an optimized frame length T for successive speech data processing according to the characteristic parameters, making compressed encoding of the speech data in every T, assembling packet of the encoded bits with TCP or UDP, again assembling packet of the assembled bits with IP and finally outputting to the channel. The method uses single frame, variable length frame, intra-frame adaptive low speed speech encoding method, which is benefit of reducing bits rate and raising transmission efficiency. The method takes optimized length encoded frame as a unit to break the IP datagram, so it raises encoding and decoding quality of a speech data greatly. Informal test shows that the method can raise MOS (mean opinion score) value 0.1 to 0.2.

FIELD OF TECHNOLOGY

[0001] The invention relates generally to a digital encoding method in a digital communication technology; and more particularly to a low speed speech encoding method for speech data based on the Internet protocol (IP).

BACKGROUND OF THE INVENTION

[0002] In a digital communication system, the transmission channel bandwidth is always limited. In order to increase a system capacity or users number as much as possible within the limited bandwidth, it is necessary to raise the channel bandwidth utilization. One of the important manners is by using low speed speech encoding method to compress the source data. At present, the low speed speech encoding method is based on a fixed frame length. Based on the Internet protocol (IP) transmission, the data context of a speech signal is broken into one speech frame or multiple speech frames with fixed bits number.

[0003] The working procedure, including transmitting and receiving, of single frame or multiple frames with fixed length is as follow. At the transmitting end, first determine speech characteristics of an inputted speech signal with pulse code modulation (PCM). Then, determine encoding bit rate according to the characteristics of the inputted speech signal and the frame length and make compressed encoding. Finally, the compressed encoded single frame or multiple frames of the speech signal are assembled into TCP packets based on the transport control protocol (TCP) or UDP packets based on the user datagram protocol (UDP) and TCP packets or UDP packets are assembled into IP packets based on the Internet protocol (IP). The IP packets are sent to the receiving end through channels. At the receiving end, first the packet is disassembled based on the IP, and then on the TCP or the UDP. Then, whether the packet is error or delay, and whether there are packets lost are adjudged. If there is no any such abnormal situation, then the packet is normally decoded and recovered to a speech signal with PCM to output. Otherwise, the speech signal with PCM is outputted after a pre-decoding of a signal frame or multiple frames.

[0004] In the above procedure, no matter an IP packet is a single frame or a multiple frames packet, since using fixed frame length, the encoding efficiency is low, and it is difficult to decrease bit rate further. Furthermore, when an IP packet is a multiple frame packet, in situations of packet error, loss and delay, it is difficult to make any processing for signal decoding.

SUMMARY OF THE INVENTION

[0005] The purpose of the invention is to provide a low speed speech encoding method based on the Internet protocol (IP) for solving the technical problems mentioned above. The low speed speech encoding method, provided by the invention, has benefit of raising encoding efficiency, reducing compressed bits rate and guarantee speech decoding quality.

[0006] The technical scheme for implementing the purpose of the invention is that a low speed speech encoding method based on IP, comprises the following steps:

[0007] (1) A speech signal, at the signal source, is sampled and quantized to a speech data, which is then inputted sequentially according to the sampling rate;

[0008] (2) Determine characteristic parameters of the speech data according to the inputted speech data in TN duration;

[0009] (3) Determine an optimized frame length T for subsequent speech data processing according to the characteristic parameters obtained in step (2);

[0010] (4) Make compressed encoding for the speech data in every optimized frame length T;

[0011] (5) For speech data bits of every optimized length frame, first, assembling packet with TCP or UDP, then assembling packet with IP and finally outputting the packet.

[0012] The invention uses single frame, variable frame length and intra-frame adaptive low speed speech encoding method, which is benefit of raising compression of the encoding and, therefore, increasing transmission efficiency. Since an IP datagram is broken by an optimized frame length, so quality of encoding and decoding can be greatly raised.

[0013] The characteristic of the invention is by using variable frame length for speech data compressed encoding, which is benefit of raising compression ratio of encoding and, therefore, raising transmission efficiency of speech data. At the same time, by using variable length frame and single frame encoding, when there are IP packet error, loss and delay, it is benefit of dealing with these abnormal situations at decoding. Therefore, it is benefit for decoding quality of speech data. Informal test shows that under same code error rate and same compression ratio, the invention can increase MOS (mean opinion score) value at 0.1 to 0.2.

BRIEF DESCRIPTION OF THE DRAWINGS

[0014]FIG. 1 shows a main flowchart of the encoding method of the invention.

[0015]FIG. 2 shows a flowchart of a single frame IP speech transmission system based on adaptive variable frame length and variable bit rate.

[0016]FIG. 3 shows a logical structure diagram of an embodiment communication system with the encoding method of the invention.

[0017]FIG. 4 shows an embodiment flowchart of a single frame IP speech transmission system based on adaptive variable frame length and variable bit rate.

EMBODIMENTS OF THE INVENTION

[0018] The invention, a low speed speech encoding method based on Internet protocol (IP), will be described in more detail, hereinafter, with reference to the drawings and embodiments.

[0019] Principle of the invention method will be described with reference to FIG. 1 and FIG. 2.

[0020] The main steps of the invention method, shown in FIG. 1, are as follow:

[0021] In step 11, input a speech data having been quantized;

[0022] In step 12, determine characteristic parameters of the inputted speech data;

[0023] In step 13, determine an optimized frame length according to the characteristic parameters of the speech data;

[0024] In step 14, make compressed encoding for the inputted speech data, based on the optimized frame length.

[0025] In step 15, for the compressed encoding speech data, make TCP packet or UDP packet assembling, and then make the IP packet assembling and finally output to the channel.

[0026] In FIG. 2, a PCM signal source is connected with the speech characteristics determining module 201, and sends a quantized speech data to the module 201. The speech data is sequentially inputted according to the sampling rate during the PCM quantization. The speech determining module 20l determines the characteristic parameters of the speech data inputted at duration (TN ms). Length of the duration is determined by the followings: first, it is necessary to keep the compressed encoding efficiency as high as possible; second, the duration cannot be too long. Experience shows that it is optimized for 5 ms≦TN≦30 ms. The variable length frame and variable bit rate module 202 determines an optimized frame length (T) for the subsequent processing of the inputted speech data according to the speech characteristic parameters, i.e., the vary frequency of the speech. The basic principles to determine the optimized frame length are as follow: under the condition that an inputted speech characteristics are unchanged during a short duration, the speech data is broken into frames with a length as long as possible. Specifically speaking, if the speech frequency is fast, then the frame length is shorter, otherwise it is longer. Therefore, within duration TN, the possible optimized frame length T is: T=T1, T2 . . . TN, a limited set. The speech compressed encoding module 203 encodes speech data of each optimized length (T) frame with the intra-frame variable bit rate algorithm and outputs the encoded NUM bits. Within duration TN, encoded NUM bits of every frame with optimized length constitutes a limited set also, expressed as NUM=NUM1, NUM2 . . . NUMM. The signal frame assembling module for TCP packet or UDP packet 204 adds packet head of TCP or UDP to the encoded NUM bits of each optimized length frame, expressed as NUM_P. The single frame assembling module for IP packet 205 adds route information to NUM_P to form a NUM_IP bits speech data for every frame and sends to receiving end through the channel 206.

[0027] At the receiving end, first, the disassembling module for IP packet 207 disassembles the NUM_IP bits speech data. Then, the output of module 207 is again disassembled by the disassembling module 208 for TCP packet or UDP packet. In a normal situation, the speech data decoding module 210 makes a decoding normally. Nevertheless, during transmission, an error code or transmission delay etc. may happen because quality of the channel etc. In these cases, if module 209 has checked that there are packet error, loss or delay, the single frame predictive decoding module 211 makes decoding. Since there is only one frame transmission, it is easy for the speech data decoding module to deal with the abnormal situations. Finally, the speech data output module 212 recovers a PCM speech data to output.

[0028] In summary, the working principle and flow shown in FIG. 1 and FIG. 2 include speech encoding and packet assembling based on IP at transmitting end and packet disassembling based on IP and speech decoding at receiving end.

[0029] The basic operation steps for speech encoding and packet assembling are:

[0030] (1) A sampled and quantized speech data is inputted with the sampling sequence;

[0031] (2) A speech characteristics determining module determines speech characteristic parameters according to the inputted speech data at every TN ms duration. Then, according to the characteristic parameters of the speech data, i.e., vary frequency of the speech, an optimized length T of a frame for subsequent speech processing is determined. T=T1, T2 . . . TN is a limited set;

[0032] (3) The speech data within the optimized length frame is encoded with the intraframe variable bit rate algorithm, and the encoded NUM bits of every optimized length frame are outputted. The NUM is also a limited set, NUM=NUM1, NUM2 . . . NUMM;

[0033] (4) The encoded NUM bits are added with packet head of TCP or UDP to form a NUM_P bits for every optimized length frame;

[0034] (5) The NUM_P bits are added with packed head of IP, which includes route information, to form a NUM_IP bits for every optimized length frame;

[0035] (6) The NUM_IP bits for every optimized length frame are sent to the receiving end through the channel.

[0036] The basic operation steps for IP packet disassembling and decoding are:

[0037] (1) First, the received packet is disassembled with IP by the receiving end;

[0038] (2) Then, the disassembled packet is again disassembled with TCP or UDP;

[0039] (3) Under normal situation, the speech decoding module makes decoding normally;

[0040] (4) Under abnormal situation, it is decoded by single frame predictive decoding module ;

[0041] (5) The recovered speech data are outputted.

[0042] The invention, a variable length frame and variable bit rate encoding method, can be used in the IP speech transmission of public network and private network on the Internet network. The invention also can be used in the future mobile communication for speech transmission based on the IP core network.

[0043]FIG. 3 shows IP speech transmission of a public telephone network on the Internet network. Wherein the IP gateway uses the variable length frame and variable bit rate encoding method proposed by the invention. When an IP packet is transferred on the Internet network, if there are packet loss or error, the decoder can correct the decoding deviation according to the invention. Since the transmission is in a variable length frame, so there is a better correction quality for speech decoding.

[0044] Refer to FIG. 4, there is an embodiment of a variable length frame and variable bit rate encoding method for the IP gateway. The encoding bit rates are 2kbit/s, 4 kbit/s and 8 kbit/s. The basic operation steps are shown below.

[0045] Steps 401, 402, 403, 404, 405 and 406 constitute the speech encoding and IP packet assembling part.

[0046] (1) The input signal is a sampled and quantized speech data with sampling rate 8000 Hz and is inputted according to the sampling sequence. The optimized length frame T is that T1=5 ms, T2=10 ms, T3=15 ms, T4=20 ms, T5=25 ms and T6=30 ms.

[0047] (2) The speech characteristics determination module determines the speech characteristic parameters according to the inputted data of every 30 ms duration (TN=30 ms). The calculation method is as follow: taking 5 ms as a fundamental tone period, and calculating, respectively, the variance D10, D15, D20, D25 and D30 of the fundamental tone periods 10 ms, 15 ms, 20 ms, 25 ms and 30 ms (step 401).

[0048] (3) The optimized frame length T and intra-frame variable bit rate, used for subsequent processing of the inputted speech data, are determined according to characteristic parameters of the speech data, i.e., the vary frequency of the speech. The infra-frame bit rate can be determined by the speech characteristics. Suppose the vowel code is with more bits and the consonant is with less bits, (step 402):

When D30<Threshold, then T=30;

When D25<Threshold, then T=25;

When D20<Threshold, then T=20;

When D15<Threshold, then T=15;

When D10<Threshold, then T=10;

Otherwise T=5;

[0049] Wherein, the Threshold is a comparative value of the variance for the fundamental tone period. The Threshold is a compromise of encoding efficiency and encoding quality.

[0050] (4) The speech data of an optimized frame length T is compressed encoded with an intra-frame variable bit rate algorithm, such as code excited linear prediction (CELP) etc. The number of bits for every encoded optimized length frame is NUM (step 403). There are three levels of NUM: T*2, T*4 and T*8.

[0051] (5) The NUM bits of an optimized length frame are assembled with TCP packet head, and the number of bits of every optimized length frame is now changed to NUM_P bits (step 404).

[0052] (6) The NUM_P bits is again assembled by the signal frame assembling module for IP packet, added with route information and changed to NUM_IP bits for every optimized length frame (step 405). The NUM_IP bits of every optimized length frame are transmitted to receiving end through a Gaussian channel (step 406).

[0053] Steps 407, 408, 409, 410, 411 and 412 constitute the IP packet disassembling and speech decoding part.

[0054] (1) The receiving end disassembles an IP packet (step 407).

[0055] (2) Make TCP packet disassembling.

[0056] (3) In a normal situation, the speech decoding module makes normal decoding (step 410).

[0057] (4) In an abnormal situation, such as packet error, loss or delay (step 409), a single frame pre-decoding is made (step 411).

[0058] (5) Output a recovered PCM speech data (step 412).

[0059] The invention is a low speed speech encoding method based on TCP/IP protocol. Through single frame, variable frame length and intra-frame adaptive encoding, a compressed encoding can be obtained, so transmission efficiency of the speech data is further raised. Moreover, an IP datagram is broken by every optimized length frame, so it is benefit of increasing quality of speech encoding and decoding. 

1. A low speed speech encoding method based on Internet protocol (IP), comprising: (1) according to the sampling rate, sequentially inputting a speech date obtained by sampling and quantizing a speech signal; (2) in a duration (TN), determining speech characteristic parameters according to inputted speech data; (3) determining an optimized frame length (T) for subsequent processing of speech data according to the speech characteristic parameters obtained at step (2); (4) making compressed encoding for speech data in every frame with the optimized frame length (T); (5) for compressed encoded speech data bits of every optimized length frame, first, assembling packet with TCP protocol or UDP protocol, then assembling packet with IP protocol and finally outputting the packet.
 2. The method according to claim 1, wherein the duration (TN) in step (2) is any duration satisfies TN≧5 ms and TN≦30 ms.
 3. The method according to claim 1, wherein the speech characteristic parameters are speech vary frequency, and the optimized frame length for subsequent processing of speech data is an optimized frame length changing with the speech vary frequency.
 4. The method according to claim 3, wherein the optimized frame length changing with the speech vary frequency is as follow: when the speech vary frequency is large, a shorter frame length is selected, and when the speech vary frequency is small, a longer frame length is selected.
 5. The method according to claim 1, wherein making compressed encoding for speech data in every frame with the optimized length (T), in step (4), is using intraframe variable bits rate algorithm.
 6. The method according to claim 1, wherein the optimized frame length (T) is a limited set of the duration (TN), T=T1 or T2 . . . or TN.
 7. The method according to claim 1, in the duration (TN), the bits number NUM of compressed encoded speech data for every optimized length frame is a limited set of NUMM, NUM=NUM1 or NUM2 . . . or NUMM. 